#include <avr/io.h>
#include <stdbool.h>

#include "../inc/uart.h"
#include "../inc/terminal.h"


bool send_cmd(unsigned char cmd, unsigned char data_0, unsigned char data_1)
{
	clear_tx_buf();
  
    uart_tx_buf[0] = cmd;
    uart_tx_buf[2] = data_0;
    uart_tx_buf[3] = data_1;
	
   if(send_page()) return true;
   else return false;
}



unsigned char wait_cmd(void)
{
  if(wait_page(0)) return rec_buf[0];
  else return 0;
}


